export enum IncomeIconTypeLabel {
    shop = "购物积分",
    fare = "运费抵扣",
    mention = "自提积分",
    recommend = "分享积分",
    team = "团队积分",
}

export namespace IncomeIconType {

    export const shop = {url: require("../../../../assets/img/buyScore.png"), label: IncomeIconTypeLabel.shop};
    export const fare = {url: require("../../../../assets/img/postage.png"), label: IncomeIconTypeLabel.fare};
    export const mention = {url: require("../../../../assets/img/self.png"), label: IncomeIconTypeLabel.mention};
    export const recommend = {url: require("../../../../assets/img/recomed.png"), label: IncomeIconTypeLabel.recommend};
    export const team = {url: require("../../../../assets/img/team.png"), label: IncomeIconTypeLabel.team};
}

export function convertIncomeTypeToUrlLabel(type: number) {
    switch (type) {
        case 1:
            return IncomeIconType.shop;
        case 2:
            return IncomeIconType.recommend;
        case 3:
            return IncomeIconType.mention;
        case 4:
            return IncomeIconType.team;
        case 5:
            return IncomeIconType.fare;
    }
}